<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<title>Site Administration</title>    
    <?php echo javascript_form_defaults()?>
    <?php echo javascript_defaults()?>
    <script src="<?php echo get_installed_path() ?>/js/admin.js" type="text/javascript" language="javascript" charset="utf-8"></script>
    <link rel="stylesheet" href="<?php echo get_installed_path() ?>/css/forms.css" type="text/css" media="screen" title="no title" charset="utf-8" />
    <link rel="stylesheet" href="<?php echo get_installed_path() ?>/css/admin.css" type="text/css" media="screen" title="no title" charset="utf-8" />
    
    <!-- tabs -->
    <link rel="stylesheet" href="<?php echo get_installed_path() ?>/js/tabpane/tab.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?php echo get_installed_path() ?>/js/tabpane/tab.webfx.css" type="text/css" media="screen" />
    <?php echo javascript_include_tag(get_installed_path().'/js/tabpane/tabpane.js')?>
    
    <!-- sortable columns -->
    <link rel="stylesheet" href="<?php echo get_installed_path() ?>/js/sortabletable/css/sortabletable.css" type="text/css" media="screen" />
    <script src="<?php echo get_installed_path() ?>/js/sortabletable/js/sortabletable.js" type="text/javascript" language="javascript" charset="utf-8"></script>
    
</head>
<body>
    <div id='wrap'>
        
    <div id='header'>        
        <?php echo link_to('Logout',
                            array('controller'=>'login',
                                  'action'=>'logout'),
                            array('id'=>'logout'))?>
        <?php echo link_to('Your Profile',
                            array('controller'=>'admin/users',
                                  'action'=>'profile'),
                            array('id'=>'profile'))?>
        <?php echo link_to('View Site &raquo;',
                            get_installed_path().'/content',
                            array('id'=>'view_site'))?>
        <h1>Site Administration for: <?php echo $_SERVER['HTTP_HOST'] ?></h1>
        
    </div>
  <?php echo busy_image() ?>  
    <div id="nav">
        <ul>
            <li><?php echo link_to('Dashboard',array('controller'=>'admin/dashboard'))?></li>
            <?php if (has_access_to('Admin::Access Admin')) {?><li><?php echo link_to('Admin',array('controller'=>'admin/users'))?></li><?php } ?>
            <?php if (has_access_to('News::Access News')) {?><li><?php echo link_to('News',array('controller'=>'admin/news'))?></li><?php } ?>
            <?php if (has_access_to('Pages::Access Pages')) {?><li><?php echo link_to('Pages',array('controller'=>'admin/pages'))?></li><?php } ?>
            <?php if (has_access_to('Files::Access Files')) {?><li><?php echo link_to('Files',array('controller'=>'admin/files'))?></li><?php } ?>
            <?php if (has_access_to('Inbox::Access Inbox')) {?><li><?php echo link_to('Inbox',array('controller'=>'admin/inbox'))?></li><?php } ?>
        </ul>
    </div>

    
    <div id='content_wrap'> 
        <div id="all_messages">       
        <?php
            if ( $msg = flash('notice') )
            {
                echo "<div id='success_notices' class='flash_notice' style='display:none'>$msg</div>";
                echo "<script>Effect.toggle('success_notices', 'appear');setTimeout(\"new Effect.Fade('success_notices')\",3000)</script>";
            }
            if ( $msg = flash('error') )
            {
                echo "<div class='flash_error' id='error_notices' style='display:none'>$msg</div>";
                echo "<script>Effect.toggle('error_notices', 'appear');setTimeout(\"new Effect.Fade('error_notices')\",6000)</script>";
            }
        ?>
        <div id='success_messages' class='flash_notice' style='display:none'></div>
        </div>
        
        <?php echo $content_for_layout?>
    </div>
    
    </div>
    
</body>
</html>
